<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Login Page</title>
		<script language="javascript" src="/lib/Js/jquery-1.6.1.js" type="text/javascript"></script>
		<script type="text/javascript">	
		
		/*Validate = function(e)
		{
			alert("Hello");
			var login = document.getElementById('login');
			alert(login.value);
			var password = document.getElementById('password');
			alert(password.value);
			
			if(login.value == "" || password.value =="")
			{
				var Mlogin = document.getElementById('Mlogin');
				Mlogin.value = '*';
				alert(Mlogin.value);
			 	
				e.preventDefault();
			}
			
			alert($('#login').val());
			
			//e.preventDefault();

			
		
			
		};*/
		
		</script>

	</head>
<body>


	<FORM method="POST" action="login">
	<TABLE style="Width:350px;">
		<TR>
			<TD>login : </TD>
			<TD><INPUT id="login" TYPE='text' NAME='login' size='30'></TD>
		</TR>
		<TR>
			<TD><label id="Mlogin"></label></TD>
		</TR>
	<TR>
		<TD>Mot de passe : </TD>
		<TD><INPUT id="password" TYPE='password' NAME='password' size='30'></TD>
	</TR>
	<TR>
		<TD>
			<% 
				Object loginWithSuccess = request.getAttribute("loginWithSuccess");
				
				if(loginWithSuccess != null){
					
					if(loginWithSuccess.equals(false))
					{
						out.print("Login Failed.");
					}
				}
			%>
		</TD>
	</TR>
	<TR>
		<TD>&nbsp;</TD>
		<TD style='text-align :right'>
		<INPUT TYPE="submit" value="Valider"  onclick="Validate(this)">
	</TD>
	</TR></TABLE>
	</FORM>

</body>
</html>